package com.ac.scum.log.task.mapper.server;

import com.ac.scum.log.bean.Package;
import com.ac.scum.log.bean.ServerFTP;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface ServerFTPMapper extends BaseMapper<ServerFTP> {

    @Select("select * from server_package where server_id = #{serverId} and package_id =#{packageId} and expiration_time > now()")
    Package findValidPackage(@Param("serverId") Long serverId, @Param("packageId") Long packageId);

}
